Image forming apparatus and method of copying two-sided card thereof

ABSTRACT

An image forming apparatus to copy a two-sided card is disclosed. The image forming apparatus includes a user interface unit to adjust a layout for copying both sides of the two-sided card, an image reading unit to read the both sides of the two-sided card and generates scanned images, a controlling unit to generate image data where the scanned images are laid out on at least one page according to the adjusted layout, and an output unit to output the image data generated by the controlling unit. Accordingly, the both sides of the two-sided card may be laid out and output in various types.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. §119(a) from Korean Patent Application No. 2010-0042434, filed on May 6, 2010 in the Korean Intellectual Property Office and Russia Patent Application No. 2009146134, filed on Dec. 14, 2009 in the Russia Intellectual Property Office, the contents of which are incorporated herein by reference in their entirety.

BACKGROUND

1. Field of the Invention

The present general inventive concept relates to an image forming apparatus and a method of copying a two-sided card thereof, and, more particularly, to an image forming apparatus and a method of copying two-sided cards such as bank cards, ID cards, business cards, courtesy cards and so on, with automatic alignment, rotation and layout of card images on a piece of paper.

2. Description of the Related Art

Conventional image forming apparatuses such as an MFP apparatus has been demonstrating the “ID copy” function. In this function, a user selects an “ID copy” mode, places one side of a card on a scanner glass which corresponds to an upper half of a piece of A4 paper, and presses a copy button. The image of the one side of the card is scanned and stored in an MFP memory. Next, the user places the other side of the card on the scanner glass, and presses the copy button again. The other side of the card is scanned as well. Next, the page is rendered from the two images of the card. Finally, the page is printed. FIG. 1 demonstrates an example of copying a two-sided card using the above function.

U.S. Publication No. 2006/0268361 by Marc Krolczyk (Xerox) describes a user interface of a system for copying a two-sided identification document and a corresponding method.

Japan patent application 2009/100102 by Ocada Mamoru describes an image forming apparatus which operates in the same method as the existing “ID copy” function in general. As additional improvements, several types of methods for aligning card side images on one page were proposed.

However, the existing “ID copy” function in an MFP has several drawbacks. First, images of card sides are copied without any deskewing and orientation. Thus, a result of a copy may be significantly skewed, which would make the copy look careless. Moreover, a user may accidentally place card sides in opposite orientations (rotated by 180 degrees) or one side in landscape and the other side in portrait orientation (rotated by 90 or 270 degrees).

Existing copying devices allow only one layout: a first card side copied on an upper half of a page with portrait orientation and a second card side copied on a lower half of the page. Accordingly, it is not possible to copy a card of which the size is bigger than a half of the page with portrait orientation using the “ID copy” function. Duplex copying is not possible either using the “ID copy”.

Besides, a user may forget to place a front or back side of a card on the scanner and press the copy button. That is because there are no alerts for blank page copying.

Often only a part of the scanner glass corresponding to an upper half of a piece of A4 page is used for scanning in the “ID copy” mode. In this case, when a user places a card in the center of the scanner glass and copies the card, a clipped or deteriorated image of the card may be printed. Nevertheless, there are no alerts for such a user error either.

Furthermore, the “ID copy” function is not connected with such useful functions as “scan-to-FTP” and “scan-to-email”. Accordingly, it is not possible to store both sides of a card to a file without additional processing by means of software on a PC.

The aforementioned existing ID copy function is illustrated in FIG. 1.

SUMMARY

The present general inventive concept provides an image forming apparatus to adjust a layout of a two-sided card and to copy the two-sided card, and a method thereof.

Additional features and utilities of the present general inventive concept will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present general inventive concept.

Exemplary embodiments of the present general inventive concept can provide a method of copying a two-sided card, the method including adjusting a layout for copying a two-sided card, scanning a front side of the two-sided card, deskewing the front side of the two-sided card scanned, detecting a direction of the front side of the two-sided card scanned; scanning a back side of the two-sided card, deskewing the back side of the two-sided card scanned, detecting a direction of the back side of the two-sided card scanned; building at least one page from the front and back side images of the two-sided card according to the adjusted layout, and outputting the at least one page or storing the at least one page to a file.

Herein, the adjusting a layout for copying a two-side card selects any one of the following layout versions: copying both sides of the card on a page with portrait orientation such that each side locates in a center of an upper portion and lower portion of the page; copying both sides of the card on a page with portrait orientation such that each side locates in an upper portion of the page, one under the other; copying both sides of the card on a page with portrait orientation such that each side locates in a center of the page, one next to the other; copying both sides of the card on a page with portrait orientation such that each side locates in an upper portion of the page, one next to the other; copying both sides of the card on a page with landscape orientation such that each side locates in a center of a left and right portion of the page; copying both sides of the card on a page with landscape orientation such that each side locates in a center of the page; one under the other; copying both sides of the card on a page with landscape orientation such that each side locates in a left portion of the page, one under the other; copying both sides of the card on a page with landscape orientation such that each side locates in a left portion of the page, one next to the other; copying both sides of the card on a page with portrait orientation such that each side locates in a center of the page, one overlapping with the other; copying both sides of the card on a page with portrait orientation such that each side locates in a center of an upper portion of the page, one overlapping with the other; copying both sides of the card on a page with landscape orientation such that each side locates in a center of the page, one overlapping with the other; and copying both sides of the card on a page with landscape orientation such that each side locates in a left portion of the page, one overlapping with the other.

The deskewing the front and back images of the two-sided card can include calculating coordinates of a bounding box of the scanned image, detecting a skew-angle of the scanned image, and if an absolute value of the skew-angle is 0.5° or more, rotating the scanned image by a minus skew-angle.

Exemplary embodiments of the present general inventive concept may also provide an image forming apparatus to copy a two-sided card, the image forming apparatus including a user interface unit to adjust a layout for copying both sides of a two-sided card, an image reading unit to read the both sides of the two-sided card and generates scanned images, a controlling unit to generate image data where the scanned images are laid out on at least one page according to the adjusted layout, and an output unit to output the image data generated by the controlling unit.

The controlling unit may deskew the scanned image, and detect an orientation of the scanned image.

The image forming apparatus may further include a storage unit to store the page built by the controlling unit.

Herein, the layout may be at least one of copying both sides of a two-sided card on a page with portrait orientation, copying both sides of a two-sided card on a page with landscape orientation, and duplex copying.

The controlling unit can calculate coordinates of a bounding box of the scanned image, detect a skew-angle of the scanned image, and when an absolute value of the detected skew-angle is 0.5° or more, can deskew the scanned image by rotating the scanned image by a minus skew-angle.

Exemplary embodiments of the present general inventive concept may also provide a method of copying a two-sided card, the method including adjusting a layout for copying both sides of a two-sided card, reading the both sides of the two-sided card to form scanned images, generating image data where the scanned images of the both sides of the two-sided card are laid out onto at least one page according to the adjusted layout, and outputting the generated page.

The method may include deskewing the scanned image, and detecting an orientation of the scanned image.

The method may also include storing the genearted page.

The layout may be at least one of copying both sides of the card on a page with portrait orientation, copying both sides of the card on a page with landscape orientation, and duplex copying.

The deskewing may include calculating coordinates of a bounding box of the scanned image, detecting a skew-angle of the scanned image, and when an absolute value of the detected skew-angle is 0.5° or more, rotating the scanned images by a minus skew-angle.

According to exemplary embodiments of the present general inventive concept, the images may be deskewed and may be implemented in various forms including duplex copying. Both sides of the two-sided card may be stored to a file, and a blank page may be detected and clipping of an image may be detected during scanning. The exemplary embodiments of the present general inventive concept disclosed herein can reduce memory usage and computational complexity.

Exemplary embodiments of the present general inventive concept also provide a method of copying a two-sided card with an image forming apparatus having a scanner, the method including receiving a selection of a layout for copying both sides of the two-sided card with an input unit, scanning both sides of the two-sided card with the scanner to form images of the both sides of the two-sided card, and generating an output image to be output by the image forming apparatus by combining the formed images of the two-sided card according to the received selection of the layout.

The method may also include deskewing the scanned images of the both sides of the two-sided card with a processor of the image forming apparatus before the generating the output image.

The deskewing the scanned images in the method may include calculating coordinates of a bounding box of the scanned images, detecting a skew-angle of the scanned images, and when an absolute value of the detected skew-angle is 0.5° or more, deskewing the scanned images by rotating them by a minus skew-angle.

Exemplary embodiments of the present general inventive concept also provide an image forming apparatus to copy a two-sided card, the image forming apparatus including an input unit to receive a selection of a layout to copy both sides of the two-sided card, a scanner to scan both sides of the two-sided card to form images of the both sides of the two-sided card, and a processor to generate an output image to be output by the image forming apparatus by combining the scanned images of the two-sided card according to the received selection of the layout.

The processor of the image forming apparatus can deskew the scanned images.

The processor of the image forming apparatus can calculate coordinates of a bounding box of the scanned images, detect a skew-angle of the scanned images, and when an absolute value of the detected skew-angle is 0.5° or more, the processor can deskew the scanned images by rotating them by a minus skew-angle.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other features and utilities of the present general inventive concept will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:

FIG. 1 illustrates an example of copying a two-sided card according to the related art;

FIG. 2 illustrates a method of copying a two-sided card according to exemplary embodiments of the present general inventive concept;

FIG. 3 is a flowchart illustrating a method of copying a two-sided card according to exemplary embodiments of the present general inventive concept;

FIG. 4 illustrates a user interface to adjust a layout according to exemplary embodiments of the present general inventive concept;

FIG. 5 is a block diagram illustrating an image forming system to copy a two-sided card according to exemplary embodiments of the present general inventive concept;

FIG. 6 is a flowchart illustrating an image deskewing method according to exemplary embodiments of the present general inventive concept;

FIG. 7 is a flowchart illustrating a method of calculating coordinates of a bounding box according to exemplary embodiments of the present general inventive concept;

FIG. 8 is a flowchart illustrating a skew-angle detection method according to exemplary embodiments of the present general inventive concept;

FIG. 9 is a flowchart illustrating an image orientation detection method according to exemplary embodiments of the present general inventive concept;

FIG. 10 is a block diagram illustrating a configuration of an image forming apparatus according to exemplary embodiments of the present general inventive concept; and

FIG. 11 is a flowchart illustrating a method of copying a two-sided card according to exemplary embodiments of the present general inventive concept.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Reference will now be made in detail to the embodiments of the present general inventive concept, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present general inventive concept by referring to the figures.

FIG. 2 illustrates a method of copying a two-sided card according to exemplary embodiments of the present general inventive concept. As illustrated in FIG. 2, a first side (e.g., top side) of a two-sided card can be scanned (e.g., by the image reading unit 120 of the image forming apparatus 100 illustrated in FIG. 10 as described below) in a first scanning pass, and a second side (e.g., bottom side) of the two-sided card can be scanned in a second scanning pass. In exemplary embodiments of the present general inventive concept, a controller and/or processor (e.g., controlling unit 130 of image forming apparatus 100 illustrated in FIG. 10) can generate an image that includes the first side and second side images from the first and second scanning passes, respectively.

That is, FIG. 2 illustrates an example of a method to copy a two-sided card on a page with landscape orientation, where images of the card can be located in a center left and right of the page according to exemplary embodiments of the present general inventive concept. Deskewing, detection of orientation, rotation, and layout of an image (e.g., the images of the first side and the second side, and the generated image that includes them) according to an adjusted layout can be provided by the exemplary embodiments of the present general inventive concept as discussed in detail below, unlike the related art method illustrated in FIG. 1.

FIG. 3 is a flowchart illustrating a method of copying a two-sided card according to exemplary embodiments of the present general inventive concept.

According to FIG. 3, a layout to copy a two-sided card through a user interface can be adjusted at operation 301.

FIG. 4 illustrates a user interface to adjust a layout according to exemplary embodiments of the present general inventive concept. That is, FIG. 4 illustrates selectable positions of the first and second sides (e.g., illustrated as number 1 and 4 in FIG. 4) from the first and second scanning passes, respectively, and their orientation on a page that may have a portrait orientation or a landscape orientation. The user interface and layouts illustrated in FIG. 4 can be used to adjust the layout to copy the two-sided card at operation 301 of FIG. 3

Layout versions, such as those illustrated in FIG. 4, may be divided into at least three groups: (1) copying both sides of a two-sided card on a page with portrait orientation, (2) copying both sides of a two-sided card on a page with landscape orientation, and (3) duplex copying. The following are exemplary layouts, but there is no limitation and thus other layouts may be used in the exemplary embodiments of the present general inventive concept as disclosed herein.: Exemplary embodiments of the present general inventive concept may include: copying both sides of a card on a page with portrait orientation such that each side locates in a center of an upper portion and lower portion of the page; copying both sides of a card on a page with portrait orientation such that each side locates in an upper portion of the page, one under the other; copying both sides of a card on a page with portrait orientation such that each side locates in a center of the page, one next to the other; copying both sides of a card on a page with portrait orientation such that each side locates in an upper portion of the page, one next to the other; copying both sides of a card on a page with landscape orientation such that each side locates in a center of a left and right portion of the page; copying both sides of a card on a page with landscape orientation such that each side locates in a center of the page, one under the other; copying both sides of a card on a page with landscape orientation such that each side locates in a left portion of the page, one under the other; copying both sides of a card on a page with landscape orientation such that each side locates in a left portion of the page, one next to the other; copying both sides of a card on a page with portrait orientation such that each side locates in a center of the page, one overlapping with the other; copying both sides of a card on a page with portrait orientation such that each side locates in an upper portion of the page, one overlapping with the other; copying both sides of a card on a page with landscape orientation such that each side locates in a center of the page, one overlapping with the other; and copying both sides of a card on a page with landscape orientation such that each side locates in a left portion of the page, one overlapping with the other.

Referring again to FIG. 3, a front side of the two-sided card can be scanned at operation 302. At operation 303, the front side image may be deskewed. That is, if there is any skew of the scanned imaged of the front side of the card because of its orientation during the scanning operation 302, the amount of skew can be detected, and the detected skew can be removed and/or minimized at operation 303. A direction of the front side image can be detected at operation 304. That is, at operation 304, it may be determined whether the front side image is oriented at 0, 45, 90, 120, and/or 180 degrees, or at any other suitable position.

The scanning operation 305, deskewing operation 306, and direction detecting operation 307 can be performed on a back side of the two-sided card as well. Operations 305, 306, and 307 may be similar to and or the same as operations 302, 303, and 304, respectively, but they are performed on the back side of the two-sided card, rather than the front side of the two-sided card.

One or more pages from both side images (e.g., the scanned front side image and the back side image) can be formed by duplex copying at operation 308. Scanned images can be rotated according to an adjusted layout (e.g., where the layout may be adjusted according to the selected adjusted layout at operation 301) and detected orientation. That is, the adjusted layout may include the placement of the front side and back side images on a page relative to one another, the orientation of the page (e.g., portrait or landscape orientation), and/or any other suitable layout selections to carry out the exemplary embodiments of the present general inventive concept.

One or more pages can be output (e.g., output to printer 503 illustrated in FIG. 5) and/or stored to a file (e.g., the file may be stored in RAM 505 and/or hard disk drive (HDD) 507 illustrated in FIG. 5) at operation 309. For example, the one or more pages can be stored in a PDF file (e.g., to be attached to an email).

FIG. 5 is a block diagram illustrating an image forming system 500 to copy a two-sided card according to exemplary embodiments of the present general inventive concept.

The image forming system 500 illustrated in FIG. 5 may be a MFP (multi-function printer) apparatus (e.g., an apparatus that includes one or more of scanning, printing, copying, and/or faxing) or a digital copier.

The Central Processing Unit (CPU) 501 can control a scanner 502, a printer 503, a user interface 504, RAM (random access memory) 505, ROM (read only memory) 506, HDD (hard disk drive) 507, and data bus 508 of the image forming system 500. The CPU 501 can be a processor, a filed programmable gate array, a programmable logic device, an application specific integrated circuit, a controller, and/or any other suitable device to carry out the exemplary embodiments of the present general inventive concept. Both sides of a card can be scanned by a scanner 502. Generated image pages that may be formed from the scanner 502 can be output to a duplex printer 503 to be printed. Printer 503 may be a laser printer, an inkjet printer, a thermal printer, and/or any other suitable printer to carry out thee exemplary embodiments of the present general inventive concept. A user interface module 54 can receive input to adjust a layout. The user interface module 54 may be a touch-screen display, or may include a display on a display device, where a keyboard, keypad, and/or input device may receive input of an adjustment selection to adjust a layout.

The scanned images and rendered pages can be stored in the RAM 505 of the image forming system 500. The CPU 501 may form one or more pages by executing program codes stored in the ROM 506 and/or HDD 507, but can also deskew and detect directions of card images.

The hard disk drive (HDD) 507 can store the one or more rendered to at least one file. In exemplary embodiments of the present general inventive concept, the HDD 507 can be a hard disk drive, a solid state drive, or any other suitable non-volatile memory. The image forming system can include the data bus 508 to transmit data between the modules of the system (e.g., between the scanner 502, the printer 503, the user interface 504, the RAM (random access memory) 505, the ROM (read only memory) 506, the HDD (hard disk drive) 507, and the CPU 501).

FIG. 6 is a flowchart illustrating a method of deskewing images according to exemplary embodiments of the present general inventive concept.

The method illustrated in FIG. 6 can deskew front side and back side images of a two-sided card. At operation 601, coordinates of a bounding box can be calculated. That is, a bounding box may be arranged around at least a portion of the scanned image of the front side and/or the back side image that is determined to include skew, and that is to be deskewed according to the method illustrated in FIG. 6. The CPU 501 illustrated in FIG. 5 can determine the skewed portion of the image, and can determine coordinates for a bounding box to be placed around the portion of the image. A skew angle can be detected at operation 602 of at least the area bounded by the bounding box. At operation 603, it is determined whether an absolute value of the skew angle is greater than or equal to 0.5 degrees. When the absolute value of the skew angle is greater than or equal to 0.5 degrees, the image can be rotated by a minus (e.g., negative) skew angle at operation 604. That is, the skew of the image can be reduced and or eliminated by rotating the image by a predetermined and/or calculated negative skew angle. As described above and as illustrated in FIG. 6, although the inequality of operation determines whether an absolute value of the skew angle is greater than or equal to 0.5 degrees, any other suitable value in degrees may be compared to the absolute value of the skew angle in accordance with exemplary embodiments of the present general inventive concept as disclosed herein.

FIG. 7 is a flowchart illustrating a method of calculating coordinates of a bounding box according to exemplary embodiments of the present general inventive concept.

At operation 701, projections on horizontal and vertical axes can be determined (e.g., by CPU 501 illustrated in FIG. 5). In exemplary embodiments of the present general inventive concept, the projections may be calculated as follows:

${{BW}\left( {r,c} \right)} = \left\{ {{{\begin{matrix} {1,} & {{{R\left( {r,c} \right)} + {G\left( {r,c} \right)} + {B\left( {r,c} \right)}} < T} \\ {0,} & {{otherwise},} \end{matrix}{{Ph}(c)}} = {\sum\limits_{r = 1}^{Nr}\;{{BW}\left( {r,c} \right)}}},{{{Pv}(r)} = {\sum\limits_{c = 1}^{Nc}\;{{BW}\left( {r,c} \right)}}},} \right.$ where BW is a binary image (i.e., a thresholding result); r and c are coordinates of image pixels, where r is the row index and c is the column index; R, G, B are color channels of the image; Ph is a projection of the binary image BW on a horizontal axis; Nr is the number of rows in an image; Nc is the number of columns in an image; Pv is a projection of the binary image BW on a vertical axis; Nr is a number of rows in the image; Nc is a number of columns; and T is a predetermined threshold.

The projections can be filtered by a minimal (erosion) filter with structure element (aperture and/or filter mask) [1 1 1 1 1] at operation 702. Alternatively, the structure element (aperture and/or filter mask) may be 1 1 1 1 or 1 1 1 1 1. For example, the projections may be filtered as follows, where Phf is a filtered projection of the binary image on the horizontal axis, and Pvf is a filtered projection of the binary image on the vertical axis: Phf(c)=min(Ph(c−2),Ph(c−1),Ph(c),Ph(c+1),Ph(c+2)), Pvf(r)=min(Pv(r−2),Pv(r−1),Pv(r−1),Pv(r),Pv(r+1),Pv(r+2)).

At operation 703, bounding box coordinates r_(min), r_(max) and c_(min), c_(max) as leftmost and rightmost positions where a magnitude of filtered projection can be greater than the predetermined threshold for vertical and horizontal projections. The bounding box (i.e., bounding rectangle) coordinates c_(min) and r_(min) may be coordinates of the left-top corner of the bounding box, and c_(max) and r_(max) may be the coordinates of the right-bottom corner of the bounding box. The coordinates of the bounding box r_(min), r_(max) and c_(min), c_(max) may be computed, calculated, and/or determined as extreme left and extreme right positions, in which the value of the filtered projection can be more than (i.e., greater than) a predetermined threshold for projections on the vertical and horizontal axes accordingly. The bounding box coordinates r_(min), r_(max) and c_(min), c_(max) can be correspondingly calculated (e.g., by CPU 501 illustrated in FIG. 5):

${r_{\min} = {\min\limits_{\forall r}\left( {{Nr},{r❘{{{Pvf}(r)} > {{Nc}/32}}}} \right)}},{r_{\max} = {\max\limits_{\forall r}\left( {1,{r❘{{{Pvf}(r)} > {{Nc}/32}}}} \right)}},{c_{\min} = {\min\limits_{\forall c}\left( {{Nc},{c❘{{{Phf}(c)} > {{Nr}/32}}}} \right)}},{c_{\max} = {\max\limits_{\forall c}{\left( {1,{c❘{{{Phf}(r)} > {{Nr}/32}}}} \right).}}}$

Operation 704 can determine whether or not there is a blank page. When r_(min)>r_(max) or c_(min)>c_(max), a blank page can be detected and an alert for a user can be generated at operation 705.

To decrease memory usage, a part of the scanner glass (e.g., a platen of scanner 502 illustrated in FIG. 5) that corresponds to an upper half of a page can be used at the scanning stage (e.g., scanning operations 302 and 305 as illustrated in FIG. 3 and described above). In this case, a clipping of card (e.g., scanning only a portion of a card, rather than the whole care) image is possible. Operation 706 can determine a clipping of an image. When r_(max)==Nr, a card image can be clipped and an alert can be generated at operation 707.

FIG. 8 is a flowchart illustrating a skew-angle detection method according to exemplary embodiments of the present general inventive concept.

The exemplary embodiments of the present general inventive concept can be applied to a plurality of types of card images and can provide increased accuracy in estimating skew-angles. At operation 801, a bounding box can be extended. According to exemplary embodiments of the present general inventive concept, the extended bounding box may be determined as follows: dc=(c _(max) −c _(min))/4,dr=(r _(max) −r _(min))/4, ce _(min)=max(1,c _(min) −dc),ce _(max)=min(Nc,c _(max) +dc), re _(min)=max(1,r _(min) −dr),re _(max)=min(Nr,r _(max) +dr). where r and c are coordinates of image pixels, dc is an average change from a maximum value to a minimum value of the coordinate c, dr is an average change from a maximum value to a minimum value of the coordinate r, Nc is the number of columns in the image, the bounding box coordinates c_(min) and r_(min) may be coordinates of the left-top corner of the bounding box, c_(max) and r_(max) may be the coordinates of the right-bottom corner of the bounding box, ce_(min) and re_(min) are coordinates of a left-top corner of an expanded bounding box (i.e., bounding rectangle), ce_(max) and re_(max) are coordinates of a right-bottom corner of the expanded bounding box, and Nr is the number of rows in an image. Operation 801 can determine the presence of an image of a card side (e.g., an entire image of a card side) inside a bounding box. At operation 802, for each column, a distance from a top and bottom to a nearest foreground pixel of the extended bounding box can be calculated, and the distances can be stored to distance arrays as follows, where Dt and Db are arrays of distances from the top and bottom of the bounding box corresponding up to the nearest pixel of binary image inside of an extended bounding box (i.e., extended bounding rectangle), and c is a column index and r is a row index:

$\left. {{{{Dt}(c)} = {\min\left( {\left( {{re}_{\max} - {re}_{\min}} \right),{\min\left( {{r❘\underset{r \in {\lbrack{{re}_{\min},{re}_{\max}}\rbrack}}{{BW}\left( {r,c} \right)}} = 1} \right)}} \right)}},{{{Db}(c)} = {\min\left( {\left( {{re}_{\max} - {re}_{\min}} \right),{{\max\left( {r❘{\underset{r \in {\lbrack{{re}_{\min},{re}_{\max}}\rbrack}}{{BW}\left( {r,{ce}_{\max}} \right.} - c}} \right)} = 1}} \right)}}} \right),$ where c [ce_(min), ce_(max)]. That is, ce_(min) is the left-top corner column coordinate (i.e., column coordinate c of an image pixel) of the expanded bounding box, ce_(max) is the right bottom corner column coordinate (i.e., column coordinate c of an image pixel) of the expanded bounding box, where ce_(min) and ce_(max) represent the linear span of the column coordinate c (i.e., c [ce_(min), ce_(max)]).

As discussed below, the determined distance arrays can be filtered by a minimal filter. At operation 803, the distance arrays can be filtered with structure element (aperture and/or filter mask) [1 1 1 1 1] by a minimal (erosion) filter. Alternatively, the structure element (aperture and/or filter mask) may be 1 1 1 1 1. The filtration of the distance arrays may be determined as follows, where Dtf and Btf are filtered arrays of distances from the top and bottom of the bounding box correspondingly up to the nearest pixel of the binary image inside the extended bounding box: Dtf(c)=min(Dt(c−4), . . . ,Dt(c), . . . ,Dt(c+4)) Dbf(c)=min(Db(c−4), . . . ,Db(c), . . . ,Db(c+4))

At operation 804, derivatives of the distance arrays can be calculated formulas as follows: dDtf(c)=Dtf(c+4)−Dtf(c−4) dDbf(c)=Dbf(c+4)−Dbf(c−4)

At operation 805, the distances ranges on the distance arrays can be selected as follows:

$\left\{ {{St}(i)} \right\} = \left\{ {{\forall{\underset{c \in {\lbrack{{{st}\; 1{(i)}},{{st}\; 2{(i)}}}\rbrack}}{{{dDtf}(c)}} \leq 10}},\left( {{{{{st}\; 2(i)} - \left. \quad{{st}\; 1(i)} \right)} \geq 50},{{{Dtf}\left( {{st}\; 2(i)} \right)} < {3{\left( {{re}_{\max} - {re}_{\min}} \right)/4}}}} \right\},\mspace{79mu}{i = {1\ldots\;{Nt}}},{\left\{ {{Sb}(j)} \right\} = \left\{ {{\forall{\underset{c \in {\lbrack{{{sb}\; 1{(j)}},{{sb}\; 2{(j)}}}\rbrack}}{{{dDbf}(c)}} \leq 10}},\left( {{{{{sb}\; 2(j)} - \left. \quad{{sb}\; 1(j)} \right)} \geq 50},{{{Dbf}\left( {{sb}\; 2(j)} \right)} < {3{\left( {{re}_{\max} - {re}_{\min}} \right)/4}}}} \right\},\mspace{79mu}{j = {1\ldots\;{Nb}}},} \right.}} \right.$ where {st1} and {sb1} are coordinates of a beginning of the straight ranges on the distance arrays from the top and bottom of the bounding box correspondingly, {st1} and {sb2} are coordinates of an ending of the straight ranges on the distance arrays from the top and bottom of bounding box correspondingly, and Nt and Nb are numbers of the straight ranges on the distance arrays from the top and bottom of bounding box correspondingly (e.g., Nt and Nb are numbers of such sites for arrays of distances from the top and bottom of the bounding box).

At operation 806, angles of one or more straight ranges can be calculated as follows:

$\mspace{79mu}{{{\mathbb{d}{x(i)}} = {{{st}\; 2(i)} - {{st}\; 1(i)} - 20}},\mspace{79mu}{{\mathbb{d}{x\left( {j + {Nt}} \right)}} = {{{sb}\; 2(j)} - {{sb}\; 1(j)} - 20}},{{\mathbb{d}{y(i)}} = {{\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dtf}\left( {{{st}\; 2(i)} - 10 + k} \right)}}} - {\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dtf}\left( {{{st}\; 1(i)} + 10 + k} \right)}}}}},{{\mathbb{d}{y\left( {j + {Nt}} \right)}} = {{\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dbf}\left( {{{sb}\; 2(i)} - 10 + k} \right)}}} - {\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dbf}\left( {{{sb}\; 1(i)} + 10 + k} \right)}}}}},\mspace{79mu}{{\alpha(n)} = {{arc}\;{{tg}\left( {{\mathbb{d}{y(n)}}/{\mathbb{d}{x(n)}}} \right)}}},\mspace{79mu}{N = {{Nb} + {Nt}}},{n = {1\ldots\; N}},}$ where {dx} is an array of adjacent cathetus, {dy} is an array of opposite cathetus, and {α} is an array of angles.

At operation 807, skew-angles from the array of angles can be estimated, where skew-angle Ø is a weighted average of angles which differ from Ø on variance δ less than 1 according to the following iterative method. An initial estimation of weighted average of angles Ø and variance δ can be determined as follows:

$\varphi = {{\sum\limits_{n = 1}^{N}{{\alpha(n)} \times {{{dx}(n)}/{\sum\limits_{n = 1}^{N}{{{dx}(n)}\delta}}}}} = {\frac{1}{N - 1}\sqrt{\sum\limits_{n = 1}^{N}\left( {\varphi - {\alpha(n)}} \right)^{2}}}}$

Herein, if δ>25, positive and negative angles can be estimated, which may be about 45 and −45 degrees, where by is a function to indicate a predetermined large positive angle, bn is a function to indicate a large negative angle, qap is a number (i.e., plurality) of predetermined large positive angles, qan is a number (i.e., plurality) of big negative angles, sap is a sum of predetermined large positive angles; qan is the sum of the predetermined large negative angles, and san is the sum of the predetermined large negative angles, as follows:

${{{bp}(x)} = \left\{ \begin{matrix} {1,{x > {38{^\circ}}}} \\ 0 \end{matrix}\quad \right.},\mspace{14mu}{{{bn}(x)} = \left\{ \begin{matrix} {0,{x < {{- 38}{^\circ}}}} \\ {0,} \end{matrix}\quad \right.}$ ${{qap} = {\sum\limits_{n = 1}^{N}{{bp}\left( {\alpha(n)} \right)}}},\mspace{14mu}{{qan} = {\sum\limits_{n = 1}^{N}{{bn}\left( {\alpha(n)} \right)}}},{{sap} = {\sum\limits^{N}{{\alpha(n)} \times {{bp}\left( {\alpha(n)} \right)}}}},\mspace{14mu}{{san} = {\sum\limits^{N}{{\alpha(n)} \times {{bn}\left( {\alpha(n)} \right)}}}},$

If qap>0 and qan>0,δ=0, then δ=0, and if sap>san, then Ø=sap/qap, or else Ø=sap/qan.

In the iterative method as described in part above, iterations can be continued while variance δ>1. If (α(n)<Ø−δ) or (α(n)<Ø+δ), then α(n) and dx(n) can be excluded from one or more arrays, and estimation of weighted average of angles Ø and variance δ can be determined as follows:

$\varphi = {{\sum\limits_{n = 1}^{N}{{\alpha(n)} \times {{{dx}(n)}/{\sum\limits_{n = 1}^{N}{{{dx}(n)}\delta}}}}} = {\frac{1}{N - 1}\sqrt{\sum\limits_{n = 1}^{N}\left( {\varphi - {\alpha(n)}} \right)^{2}}}}$

Image rotation is a well-known procedure. Generally, for a rotation about angle Ø, the following transformation matrix can be used:

$\begin{bmatrix} x^{i} & y^{i} \end{bmatrix} = {\begin{bmatrix} x & y \end{bmatrix}\begin{bmatrix} {\cos\;\varphi} & {{- \sin}\;\varphi} \\ {\sin\;\varphi} & {\cos\;\varphi} \end{bmatrix}}$

However, when performing image rotation using the transformation matrix, an additional memory buffer to store at least a part of the rotated image may be used (e.g., the image forming apparatus 100 of FIG. 10 or the image forming system 500 can include an additional memory buffer), as it may be impractical for copying devices where memory size is limited and operations with RAM may have decreased performance. In exemplary embodiments of the present general inventive concept, a rotation of the image about skew angle Ø may be performed without using additional memory buffers via two shears according to the following transformation matrices:

$\begin{bmatrix} x^{i} & y^{i} \end{bmatrix} = {{\begin{bmatrix} x & y \end{bmatrix}\begin{bmatrix} {\cos\;\varphi} & 0 \\ {\sin\;\varphi} & 1 \end{bmatrix}}\begin{bmatrix} 1 & {{- \tan}\;\varphi} \\ 0 & {\sec\;\varphi} \end{bmatrix}}$

One or more interpolation algorithms can be applied during rotation. For example, applying a bilinear interpolation may provide increased image quality and processing speed.

In detecting an orientation of a card, directions of ciphers (Arabic digits) can be detected. Identification (ID) cards, credit cards, and/or business cards can typically have one or more ciphers. Although digits ‘6’, ‘9’ and ‘8’ can be examples of rotation invariant ciphers for a 180 degrees rotation (i.e., ‘6’ and ‘9’ may be indistinguishable from one another when rotated 180 degrees, and ‘8’ may appear the same when it is rotated), ciphers such as ‘1, ‘2’, ‘3’, ‘4’, ‘5’, and ‘7’ can be used to detect an orientation. That is, an orientation of ciphers such as ‘1, ‘2’, ‘3’, ‘4’, ‘5’, and ‘7’ have a common usage orientation (e.g., where the usage orientation of these ciphers may be preset), any other orientation of these ciphers that is different from the common usage orientation may be used to detect a degree of rotation or skew from the common usage orientation). Typical problems in ciphers detection can include, for example: cards having a complex color background (e.g., multi-colored background, or a background which obscures the identification of a cipher); ciphers that may have an arbitrary color, where the cypher can be dark on a light background or the cipher can be light on a dark background; or typefaces for different ciphers on the same card can differ. For digits segmentation on a complex background (e.g., a background having a plurality of colors), labeling of connected edge regions can be used, where edge pixels can be labeled for dark ciphers on a light background and edge pixels can be labeled for light ciphers on a dark background. In exemplary embodiments of the present general inventive concept, a decision tree with a generalization can categorize and/or recognize digits, characters, and/or ciphers, so as to recognize a plurality of typefaces.

FIG. 9 illustrates a method of detecting an image orientation according to exemplary embodiments of the present general inventive concept.

The exemplary method illustrated in FIG. 9 can detect orientations of deskewed images of a front and back side of a two-sided card identically. That is, the method of the front side detection of deskewed images may be the same for a front side of a card and a back side of a card. At operation 901, a high-pass filtering of an image brightness channel can be performed by a convolution with a kernel, such as with the exemplary kernel as follows:

$\begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & {- 8} & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}\quad$ That is, an image brightness channel (that may be calculated as described below) of a scanned image of a front side of a card and/or a back side of a card can be filtered using a predetermined filter level (e.g., the pixels and/or values in the image brightness channel that are above a predetermined level pass through the filter, and those that are equal to or less than the predetermined level are retained by the filter). The values and/or pixels of the image brightness channel may be convolved with the exemplary matrix kernel above, or with any other suitable kernel to carry out the exemplary embodiments of the present general inventive concept.

A brightness channel can be calculated as (R(r,c)+G(r,c)+B(r,c))/3, where R is a red channel, G is a green channel, and B is a blue channel, and r and c are coordinates of the image pixel.

At operation 902, connected regions (e.g., regions of pixels that are adjacent to one another in an image) can be labeled for pixels of a filtered image which are greater than predetermined threshold T1, where the pixels can correspond to inner edges of dark symbols on a light background. At operation 903, connected regions can be labeled for pixels of a filtered image which are less than predetermined threshold −T1, where the pixels correspond to inner edges of light symbols on a dark background. For each connected region from both labeled images, at least one bounding box is calculated, and regions with appropriate and/or predetermined bounding box size can be selected at operation 904. For example, supposing F is a binary image of a connected region, Mr×Mc is a size of the image F, where Mr is the number of rows (i.e., height) and Mc is the number of columns (i.e., width), and r and c are coordinate values of pixels in an image. In exemplary embodiments of the present general inventive concept, a 300 dpi scanning resolution criteria for selection of appropriate regions is as follows: Mr>=14 and Mc>=14 and Mr<=70 and Mc<=70 and (Mr/Mc>1.2 or Mc/Mr>1.2).

For each connected region, recognition of at least ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, and ‘7’ ciphers for four exemplary orientations 0°, 90°, 180°, and 270° of the region and calculation of the number of recognized regions for each orientation can be determined at operation 905. At operation 906, a card image orientation Ω according to the numbers of recognized regions for each orientation can be determined as follows:

${\Omega = {\underset{{re}{({0,90,180,270})}}{\left. i \right|}{\max\left( {\left( {{0.5{N_{1}(i)}} + {N_{2}(i)} + {N_{3}(i)} + {N_{4}(i)} + {N_{5}(i)} + {0.5{N_{7}(i)}}} \right) \times \left( {{{sign}\left( {N_{1}(i)} \right)} + {{sign}\left( {N_{2}(i)} \right)} + {{sign}\left( {N_{3}(i)} \right)} + {{sign}\left( {N_{4}(i)} \right)} + {{sign}\left( {N_{5}(i)} \right)} + {{sign}\left( {N_{7}(i)} \right)}} \right)} \right)}}},$ where N₁(i), N₂(i), N₃(i), N₄(i), N₅(i) and N₇(i) are numbers of recognized regions as ciphers ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘7’ accordingly for orientation i. N₁(i) and N₇(i) can be summed with an exemplary attenuation coefficient of 0.5 because probability of false positive error can be greater for ‘1’ and ‘7’ in comparison with other digits. Detection of a plurality of digits can indicate orientation with increased probability because the sum of recognized regions for each digit can be multiplied according to the quantity of recognized ciphers.

To minimize memory usage and to provide a time-effective implementation, a two-pass labeling scheme may be used according to exemplary embodiments of the present general inventive concept, where a first pass can include calculating a bounding box of connected regions for dark and light symbols separately, and a second pass can label regions according to a size of a bounding box and can label recognized ciphers for the regions one by one (e.g., each recognized cipher of a region can be labeled).

In exemplary embodiments of the present general inventive concept, to recognize a ‘1’ cipher, the following features can be calculated:

f 1₁ = Mr/Mc; ${{f\; 1_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{Mr}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}};{\sum\limits_{r = 1}^{Mr}{\sum\limits_{c = {{Mc} - 2}}^{{Mc} - 1}{F\left( {r,c} \right)}}}} \right)}/\left( {2{Mr}} \right)}};$ ${{f\; 1_{3}} = {\sum\limits_{r = {{Mr}/2}}^{Mr}{\sum\limits_{c = 1}^{{{Mc}/2} - 1}{F\left( {r,c} \right)}}}};$ ${{f\; 1_{4}} = {\sum\limits_{r = 1}^{{{Mc}/2} - 1}{\sum\limits_{c = 1}^{{{Mc}/2} - r}{F\left( {r,c} \right)}}}};$ ${{f\; 1_{5}} = \;{\sum\limits_{r = {{Mc}/2}}^{{Mr}/2}{\sum\limits_{c = 2}^{3}{F\left( {r,c} \right)}}}};$

Using the above calculations, if the following inequalities (i.e., rule) are determined to be true, connected region F corresponds to the cipher ‘1’: f1₁>=2 and fI₁<=3.5 and fI₂>=0.7 and f I₃=0 and fI₄=0 and fI₅>=4.

In exemplary embodiments of the present general inventive concept, to recognize a ‘2’ cipher, the following features can be calculated:

  f 2₁ = Mr/Mc; $\mspace{20mu}{{{f\; 2_{2}} = {{\max\left( {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = 1}^{Mc}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}{\sum\limits_{c = 1}^{Mc}{F\left( {r,c} \right)}}}} \right)}/\left( {2{Mc}} \right)}};}$ $\mspace{20mu}{{{f\; 2_{3}} = {\sum\limits_{c = {3{{Mr}/5}}}^{3{{Mr}/4}}{\sum\limits_{r = 0}^{c - {3{{Mr}/5}}}{F\left( {{{Mr} - r},c} \right)}}}};}$ $\mspace{20mu}{{{f\; 2_{4}} = {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 1}^{2}{F\left( {r,c} \right)}}} + {\sum\limits_{r = 1}^{2}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}}}};}$ $\mspace{20mu}{{{f\; 2_{5}} = \;{{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mc}/3} + 1} \right)} \right)}};}$ ${{f\; 2_{6}} = \;{{\max\left( {{\sum\limits_{r = {{Mr}/5}}^{2{{Mr}/5}}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr}/5}}^{2{{Mr}/5}}{\sum\limits_{c = {{Mc} - 2}}^{{Mc} - 1}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)}};$ $\mspace{20mu}{{{f\; 2_{7}} = {\sum\limits_{r = {{Mr}/2}}^{2{{Mr}/3}}{\sum\limits_{c = 1}^{{2{{Mr}/3}} - r + 1}{F\left( {r,c} \right)}}}};}$

Using the calculations above, if the following inequalities are determined to be true, connected region F corresponds to the cipher ‘2’: f2₁>=1.1 and f2₁<=2.2 and f2₂>=0.65 and f2₃==0 and f2₄==0 and f2₅>0.65 and f2₆>0.55 and f2₇==0.

In exemplary embodiments of the present general inventive concept, to recognize a ‘3’ cipher, the following features are calculated:

  f 3₁ = Mr/Mc; $\mspace{20mu}{{{f\; 3_{2}} = {{{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}}} \right)}/2}\left( {{{Mc}/3} + 1} \right)}};}$ ${{f\; 3_{3}} = {{\max\left( {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mc}/3} + 1} \right)} \right)}};$ ${{f\; 3_{4}} = \;{{\max\left( {{\sum\limits_{r = {3{{Mr}/5}}}^{4{{Mr}/5}}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}};{\sum\limits_{r = {3{{Mr}/5}}}^{4{{Mr}/5}}{\sum\limits_{c = {{Mc} - 2}}^{{2{Mc}} - 1}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)}};$ ${{f\; 3_{5}} = \;{{\max\left( {{\sum\limits_{r = {{Mr}/5}}^{2{{Mr}/5}}{\sum\limits_{c = {{Mc} - 2}}^{{Mc} - 1}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr}/5}}^{2{{Mr}/5}}{\sum\limits_{c = {{Mc} - 3}}^{{2{Mc}} - 2}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)}};$ ${f\; 3_{6}} = {\max\left( {{{Mc} - {\max\limits_{\forall{i \in {\{{1,{Mc}}\}}}}\left( {\left. i \middle| {F\left( {{{Mr}/2},i} \right)} \right. = 1} \right)}},{{Mc} - {\max\limits_{\forall{i \in {\{{1,{Mc}}\}}}}{\left( {\left. i \middle| {F\left( {{{{Mr}/2} - \left. \quad{1,i} \right)} = 1} \right)} \right.,{{Mc} - {\max\limits_{\forall{i \in {\{{1,{Mc}}\}}}}\left( {\left. i \middle| {F\left( {{{{Mr}/2} - 2},i} \right)} \right. = 1} \right)}}} \right)/{Mc}}}},{{f\; 3_{7}} = {\min\left( {{\min\limits_{\forall{i \in {\{{1,{Mc}}\}}}}\left( {\left. i \middle| {F\left( {{{Mr}/2},i} \right)} \right. = 1} \right)},{\min\limits_{\forall{i \in {\{{1,{Mc}}\}}}}{\left( {\left. i \middle| {F\left( {{{{Mr}/2} - \left. \quad{1,i} \right)} = 1} \right)} \right.,{\min\limits_{\forall{i \in {\{{1,{Mc}}\}}}}\left( {\left. i \middle| {F\left( {{{{Mr}/2} + 1},i} \right)} \right. = 1} \right)}} \right)/{Mc}}},\mspace{20mu}{{{f\; 3_{8}} = {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = 1}^{2}{F\left( {r,c} \right)}}} + {\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}}}};\mspace{20mu}{{f\; 3_{9}} = {15{\sum\limits_{r = {{{Mr}/3} + 1}}^{2{{Mr}/3}}{\sum\limits_{c = 1}^{2{{Mc}/5}}{{F\left( {r,c} \right)}/({McMr})}}}}};\mspace{20mu}{{f\; 3_{10}} = {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 1}^{2}{F\left( {r,c} \right)}}} + {\sum\limits_{r = 1}^{2}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}}}};{{f\; 3_{11}} = {64{\sum\limits_{r = {{{Mr}/3} - {{({{Mr} - 2})}/16}}}^{{{Mr}/3} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{{Mc}/2} - {{({{Mc} - 2})}/16}}}^{{{Mc}/2} + {{({{Mc} - 2})}/16}}{{F\left( {r, c} \right)}/\left( {\left( {{Mc} - {\left. \quad 2 \right)\left( {{Mr} - 2} \right)}} \right);{{f\; 3_{12}} = {64{\sum\limits_{r = {{2{{Mr}/3}} - {{({{Mr} - 2})}/16}}}^{{2{{Mr}/3}} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{{Mc}/2} - {{({{Mc} - 2})}/16}}}^{{{Mc}/2} + {{({{Mc} - 2})}/16}}{{F\left( {r,c} \right)}/\left( {\left( {{Mc} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}}}};{{f\; 3_{13}} = {\left( {\left( {\max\limits_{\forall{j \in {\lbrack{{{Mr}/4},{{{Mr}/2} - {{({{{Mr}/2} - 2})}/16}}}\rbrack}}}\left( {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {{i❘{F\left( {j,i} \right)}} = 1} \right)} \right)} \right) - 1} \right)/{Mc}}};{{f\; 3_{14}} = {\left( {\left( {\max\limits_{\forall{j \in {\lbrack{{{{Mr}/2} + {{({{{Mr}/2} - 2})}/16}},{3{{Mr}/4}}}\rbrack}}}\left( {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {{i❘{F\left( {j,i} \right)}} = 1} \right)} \right)} \right) - 1} \right)/{Mc}}};{{f\; 3_{15}} = {64{\sum\limits_{r = {{{Mr}/2} - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{{Mc}/2} + 1 - {{({{Mc} - 2})}/16}}}^{{{Mc}/2} + 1 + {{({{Mc} - 2})}/16}}{{F\left( {r,c} \right)}/\left( {\left( {{Mc} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}}}}} \right.}}}}}}} \right.}}} \right.}$

Using the above calculations, if the following inequalities are determined to be true, connected region F corresponds to the cipher ‘3’: f3₁>1 and f3₁<2 and f3₂>=0.6 and f3₃>=0.7 and f3₄>0.65 and f3₅>=0.5 and f3₆>0 and f3₆<0.5 and f3₇>0.2 and f3₇<0.65 and f3₈<=1 and f3₉<0.35 and f3₁₀<=1 and f3₁₁<0.35 and f3₁₂<0.35 and f3₁₃>0.3 and f3₁₄>0.35 and f3₁₅>0.

In exemplary embodiments of the present general inventive concept, to recognize a ‘4’ cipher, the following features are calculated:

  f 4₁ = Mr/Mc; $\mspace{20mu}{{{f\; 4_{2}} = {\sum\limits_{r = 1}^{{Mc}/3}{\sum\limits_{c = 1}^{{{Mc}/3} - r - 1}{F\left( {r,c} \right)}}}};}$ $\mspace{20mu}{{{f\; 4_{3}} = {\sum\limits_{r = {{5{{Mr}/6}} + 1}}^{Mr}{\sum\limits_{c = 1}^{{Mc}/3}{F\left( {r,c} \right)}}}};}$ $\mspace{20mu}{{{f\; 4_{4}} = {\max\limits_{i \in {\lbrack{{{{Mr}/2} + 2};{4{{Mr}/5}}}\rbrack}}{\left( {\sum\limits_{c = 1}^{Mc}{F\left( {i,c} \right)}} \right)/{Mc}}}};}$ $\mspace{20mu}{{{f\; 4_{5}} = {\max\limits_{j \in {\lbrack{{3{{Mc}/4}};{5{{Mc}/6}}}\rbrack}}{\left( {\sum\limits_{r = {{Mr}/2}}^{Mr}{F\left( {r,j} \right)}} \right)/{Mr}}}};}$ $\mspace{20mu}{{{f\; 4_{6}} = {\left( {{\sum\limits_{r = 1}^{{Mr}/2}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}} + {3{\sum\limits_{r = {5{{Mr}/6}}}^{Mr}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}}}} \right)/{Mr}}};}$ $\mspace{20mu}{{{f\; 4_{7}} = {\sum\limits_{r = {{Mr}/5}}^{{Mr}/2}{\sum\limits_{c = {{Mc}/5}}^{{Mc}/2}{{F\left( {r,c} \right)}/\left( {\left( {{3{{Mr}/10}} + 1} \right)\left( {{3{{Mc}/10}} + 1} \right)} \right)}}}};}$ ${f\; 4_{8}} = {\quad{{64\mspace{14mu}{{\min\left( \begin{matrix} {{{\sum\limits_{r = {{{Mr}/2} + 1 - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + 1 + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{{Mc}/2} + 1 - {{({{Mc} - 2})}/16}}}^{{{Mc}/2} + 1 + {{({{Mc} - 2})}/16}}{F\left( {r, c} \right)}}},}} \\ {\sum\limits_{r = {{{Mr}/2} + 1 - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + 1 + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{{Mc}/2} - {{({{Mc} - 2})}/16}}}^{{{Mc}/2} + {{({{Mc} - 2})}/16}}{F\left( {r,c} \right)}}} \end{matrix} \right)}/\left( {\left( {{Mc} - 2} \right)\left( {{Mr} - 2} \right)} \right)}};}}$

Using the above calculations, if the following inequalities are determined to be true, connected region F corresponds to the cipher ‘4’: f4₁>=1 and f4₁<=2.5 and f4₂=0 and f4₃=0 and f4₄>0.65 and f4₅>=0.8 and f4₇>0.2 and f4₇<0.6 and f4₈<=0.2.

In exemplary embodiments of the present general inventive concept, to recognize a ‘5’ cipher, the following features are calculated:

  f 5₁ = Mr/Mc; $\mspace{20mu}{{{f\; 5_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 3}^{{Mc} - 2}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = 3}^{{Mc} - 2}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{Mc} - 4} \right)} \right)}};}$ ${{f\; 5_{3}} = {\max{\left( {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}{\sum\limits_{c = {{Mc}/3}}^{2{{Mc}/3}}{F\left( {r,c} \right)}}}} \right)/\left( {2\left( {{{Mc}/3} + 1} \right)} \right)}}};$ $\mspace{20mu}{{{f\; 5_{4}} = {\left( {{Mc} - \left( {\max\limits_{\forall{j \in {\lbrack{{{{Mr}/5} + 1},{2{{Mr}/5}}}\rbrack}}}\left( {\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} \right)} \right)} \right)/{Mc}}};}$ ${{f\; 5_{5}} = \;{25\mspace{14mu}{{\max\left( {{\sum\limits_{r = {{{Mr}/5} + 1}}^{2{{Mr}/5}}{\sum\limits_{c = 1}^{{Mc}/5}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{{Mr}/5} + 1}}^{2{{Mr}/5}}{\sum\limits_{c = {{Mc}/5}}^{{2{Mc}} - {/5}}{F\left( {r,c} \right)}}}} \right)}/({McMr})}}};$ $\mspace{20mu}{{{f\; 5_{6}} = {\left( {{\min\limits_{\forall{i \in {\lbrack{{3{{Mr}/5}},{Mr}}\rbrack}}}{\left( {\left. i \middle| {F\left( {i,j} \right)} \right. = 1} \right)\mspace{14mu}{and}\mspace{14mu} j}} \in \left\lbrack {{{Mc}/2},{Mc}} \right\rbrack} \right)/{Mr}}};}$ $\mspace{20mu}{{{f\; 5_{7}} = {\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{Mc} - 1}}^{Mc}{F\left( {r,c} \right)}}}};}$

Using the above calculations, the following inequalities are true, connected region F corresponds to ‘5’: f5₁>=1.2 and f5₁<=2.1 and f5₂>0.7 and f5₃>=0.6 and f5₄>=0.5 and f5₅>0.3 and f5₆<0.7 and f5₇=0.

In exemplary embodiments of the present general inventive concept, to recognize a ‘7’ cipher, the following features are calculated:

  f 7₁ = Mr/Mc; $\mspace{20mu}{{{f\; 7_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 1}^{Mc}{F\left( {r,c} \right)}}},{\sum\limits_{r = 2}^{3}{\sum\limits_{c = 1}^{Mc}{F\left( {r,c} \right)}}}} \right)}/\left( {2{Mc}} \right)}};}$ ${{f\; 7_{3}} = {\left( {\max\limits_{\forall{j \in {\lbrack{{{Mr}/4},{Mr}}\rbrack}}}\left( {{\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} - {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)}} \right)} \right)/{Mc}}};$ ${{f\; 7_{4}} = {\left( {{Mc} - {\frac{4}{Mr}{\sum\limits_{r = {3{{Mr}/4}}}^{Mr}\left( {{\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)} - {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}} \right)}}} \right)/{Mc}}};$ ${f\; 7_{5}} = {\quad\left( {{Mc} - {\frac{4}{Mr}{\sum\limits_{r = {{Mr}/4}}^{{Mr}/2}\left( {{\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}{\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = {\left. \quad 1 \right) - \left. \quad{\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)} \right)}} \right)/{Mc}}};{{f\; 7_{6}} = {{\sum\limits_{r = {{Mr}/4}}^{{Mr}/2}\left( {{\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)} - {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}} \right)} - {\sum\limits_{r = {3{{Mr}/4}}}^{Mr}{\left( {{\max\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)} - {\min\limits_{\forall{i \in {\lbrack{1,{Mc}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}} \right).}}}}} \right.}}} \right.}$

Using the calculations above, if the following inequalities are true, connected region F corresponds to ‘7’: f7₁>=1 and f7₁<=2.2 and f7₂>=0.65 and f7₃<=0.4 and f7₄>=0.3 and f7₅<=0.4 and f7₆>0.

FIG. 10 illustrates a block diagram of an image forming apparatus according to exemplary embodiments of the present general inventive concept.

As illustrated in FIG. 10, the image forming apparatus 100 can include a user interface unit 110, a scanning unit 120, a controlling unit 130, an output unit 140, a communication interface unit 150, and a storage unit 160.

The image forming apparatus 100 may be connected to an external device (e.g., a host device, a computer, a server, a storage device, etc.), and can output document data. The image forming apparatus 100 may have at least two functions of a printer, scanner, copier, and facsimile.

The user interface unit 110 can include a plurality of function keys with which a user may set or select one or more functions that the image forming apparatus 100 supports, and can display and/or indicate information that the image forming apparatus 100 provides. That is, the user interface unit 110 can receive selections, and may display information related to the available and/or selected functions. The user interface unit 110 may be a device which has both the input and output functions such as a touch pad, or may be a device where a mouse (or any other suitable device to receive input, such as a keyboard and/or keypad) and monitor are combined. The user may select one or more selectable options displayed in a user interface window provided through the user interface unit 110, to select a layout for copying a two-sided card. More specifically, the user interface unit 110 may provide at least one layout of copying both sides on a page with a portrait orientation, copying both sides on a page with a landscape orientation, and duplex copying.

The image reading unit 120 can read a front and back side of a two-sided card using an image sensor. More specifically, the image reading unit 120 may be a scanning unit to perform a scanning operation.

The scanning unit (i.e., the image reading unit 120) can perform a scanning operation according to a control signal and/or command from a controlling unit 130 which will be explained below. The scanning unit (i.e., the image reading unit 120) includes an image sensor unit (not illustrated), a motor unit (not illustrated), a location sensor unit (not illustrated), and a scan controlling unit (not illustrated).

The image sensor unit (not illustrated) can include a CIS sensor (not illustrated) to sense an image and obtains at least one RGB pixel value corresponding to the image. The image sensor unit can transmit a sensed RGB pixel value which will be explained below to the scan controlling unit (not illustrated).

The motor unit (not illustrated) can convey a page in a scan proceeding direction so as to sense the RG pixel value corresponding to the image in a line unit.

The location sensing unit (not illustrated) can detect a location of a page input to the image forming apparatus 100, and can transmit it to the scan controlling unit (not illustrated). The scan controlling unit (not illustrated) can control the image sensing unit (not illustrated), the motor unit (not illustrated), and the location sensing unit (not illustrated) so as to perform a scan operation according to a scan command received from the controlling unit 130 which will be described below. That is, the scan controlling unit (not illustrated) may combine the RGB pixel value sensed through the image sensing unit (not illustrated), such that the image data which corresponds to the image of the two-sided card can be generated.

The controlling unit 130 can control operations of each configurative element of the image forming apparatus 100 according to each prestored program. That is, the controlling unit 130 can control the operation of the user interface unit 110, the image reading unit 120, the output unit 140, the communication interface unit 150, and the storage unit 160. The controlling unit 130 can be central processing unit, a field programmable gate array, a programmable logic unit, a processor, an application specific integrated circuit, and/or any other suitable device to carry out the exemplary embodiments of the present general inventive concept as disclosed herein.

The controlling unit 130 can generate image data where a scanned image (e.g., an image scanned by the image reading unit 120) is laid out on at least one page according to a layout adjusted through the user interface unit 110.

The controlling unit 130 may deskew the scanned image, and detect and/or determine a direction of the scanned image.

More specifically, the controlling unit 130 may calculate coordinates of a bounding box of the scanned image, detect a skew-angle of the scanned image, and if an absolute value of the detected skew angle is 0.5° or more, may deskew the scanned image by a minus skew angle.

The output unit 140 outputs a page built (e.g., generated) by the controlling unit 130.

More specifically, the output unit 140 can print the data scanned at the image reading unit 120 according to the control by the controlling unit 130 and outputs it. For example, when the image forming apparatus 100 includes a laser printing unit, an OPC (organic photoconductor, not illustrated) surface can be electrically charged by an electrifying unit (not illustrated), and a latent image can be formed on the electrified region by an LSU (laser scanning unit—not illustrated). Herein, if a development is achieved by a developing unit (not illustrated), a toner is attached to the latent image, and thus is transferred to a page by a transfer unit (not illustrated). The transfer toner is settled on the page by a settling unit (not illustrated). However, this is only an exemplary embodiment, and it is obvious to those skilled in the art that the image forming apparatus can be applied to an inkjet output unit as well.

The communication interface unit 150 can be connected to a terminal device (not illustrated) such as a PC (personal computer), a server, a storage device, a laptop PC, a PDA, and a digital camera. More specifically, the communication unit 150 can connect to the image forming apparatus 100 to an external device. In exemplary embodiments of the present general inventive concept, the communication unit 150 can be connected to a terminal device through a Local Area Network (LAN), the Internet, and/or through a Universal Serial Bus (USB) port. The communication interface unit 150 may receive input of a printing job through the terminal device (not illustrated), and may also receive a printing operation of a corresponding printing job.

The storage unit 160 can store image data of at least one page generated by the controlling unit 130 and/or that is scanned by the image reading unit 120.

The storage unit 160 may temporarily store the print job received from the communication interface unit 150.

Herein, the storage unit 160 may be a storage medium that is, for example, a USB memory, a hard disk drive, a solid state drive, a removable disk, a storage medium connected to a host, or a web server communicatively coupled to the image forming apparatus 100 via a network.

FIG. 11 illustrates a flowchart of a two-sided card copying method according to exemplary embodiments of the present general inventive concept.

As illustrated in FIG. 11, a layout for copying both sides of the two-sided card can be adjusted at operation 1110. Herein, the layout may be at least one of copying both sides on a page with portrait orientation, copying both sides on a page with landscape orientation, and/or duplex copying, and/or any other suitable layout to carry out the exemplary embodiments of the general inventive concept as disclosed herein.

At operation 1120, the both sides of the two-sided card can be read to form scanned images of the both sides.

The image data where the images scanned at operation 1120 according to the layout adjusted at step 1110 can be generated on at least one page.

The page generated at operation 1130 can be output at operation 1140.

The image scanned at operation 1120 may be deskewed. In exemplary embodiments of the present general inventive concept, a direction of the deskewed scanned image may be detected (e.g., by the controlling unit 130 illustrated in FIG. 10). The image data of at least one page generated at operation 1130 may be stored (e.g., in storage unit 160 illustrated in FIG. 10).

The deskewing may include calculating coordinates of a bounding box of the scanned image, detecting a skew-angle of the scanned image, and when an absolute value of the detected skew-angle is 0.5° or more, rotating the scanned image by a minus skew-angle.

As aforementioned, since the exemplary embodiments of the present general inventive concept include deskewing the front and back side images of the two-sided card, detecting the direction of the front and back side images of the two-sided card, laying out both sides of the two-sided card on a page according to an adjusted layout including duplex copying, and storing at least one page where both sides of the two-sided card are rendered to a file. Thus, it is possible to copy the two-sided card using one or more of a plurality of methods. As explanation of a method of copying a two-sided card would overlap with the description of FIGS. 2 to 9 above, a more detailed explanation will be omitted.

The deskewing method of the exemplary embodiments of the present general inventive concept can detect a blank page and detect an image clipping during scanning. An orientation detection method according to exemplary embodiments of the present is based on a recognition of ciphers (e.g., Arabic digits) using a decision tree. This decision tree has an increased capacity of generalization so as to increase the recognition and orientation of ciphers.

The method according to the exemplary embodiments of the present general inventive concept may be performed by firmware of an image forming apparatus, a color MFP (multi-function peripheral), and/or a digital copier. The exemplary embodiments of the present general inventive concept can also be used in scanning software that is executed by the image forming apparatus and/or by a computer or other device coupled to the image forming apparatus.

Although several embodiments of the present general inventive concept have been illustrated and described, it will be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the general inventive concept, the scope of which is defined in the appended claims and their equivalents. 

What is claimed is:
 1. A method of copying a two-sided card with an image forming apparatus, the method comprising: adjusting a page layout and orientation for copying a two-sided card with a user interface of the image forming apparatus so as to position each side to be copied of the two-sided card within the page; scanning a front side of the two-sided card with an image reading unit of the image forming apparatus so as to form a front side image; deskewing the front side image of the two-sided card scanned with a control unit of the image forming apparatus so as to reduce any skew from the scanning of the front side of the two-sided card that is present in the front side image because of an orientation of the front side of the two-sided card; detecting a direction of the front side image of the two-sided card scanned with the controlling unit; scanning a back side of the two-sided card with the image reading unit so as to form a back side image; deskewing the back side image of the two-sided card scanned with the controlling unit so as to reduce any skew from the scanning of the back side of the two-sided card that is present in the back side image because of an orientation of the back side of the two-sided card; detecting a direction of the back side image of the two-sided card scanned with the controlling unit; building at least one page from the front and back side images according to the adjusted layout with the controlling unit; and outputting the at least one page with an output unit of the image forming apparatus or storing the at least one page to a file in a storage unit of the image forming apparatus, wherein the detecting a direction of the front side image and the detecting a direction of the back side image detect the direction in order not to place the deskewed image up-side down on the page.
 2. The method as claimed in claim 1, wherein the adjusting a layout for copying a two-side card comprises selecting one of: copying both sides of the card on the page with portrait orientation such that each side locates in a center of an upper portion and lower portion of the page with the image reading unit; copying both sides of the card on the page with portrait orientation such that each side locates in an upper portion of the page, one under the other with the image reading unit; copying both sides of the card on the page with portrait orientation such that each side locates in a center of the page, one next to the other with the image reading unit; copying both sides of the card on the page with portrait orientation such that each side locates in an upper portion of the page, one next to the other with the image reading unit; copying both sides of the card on the page with landscape orientation such that each side locates in a center of a left and right portion of the page with the image reading unit; copying both sides of the card on the page with landscape orientation such that each side locates in a center of the page, one under the other, with the image reading unit; copying both sides of the card on the page with landscape orientation such that each side locates in a left portion of the page, one under the other, with the image reading unit; copying both sides of the card on the page with landscape orientation such that each side locates in a left portion of the page, one next to the other, with the image reading unit; copying both sides of the card on the page with portrait orientation such that each side locates in a center of the page, one overlapping with the other, with the image reading unit; copying both sides of the card on the page with portrait orientation such that each side locates in a center of an upper portion of the page, one overlapping with the other, with the image reading unit; copying both sides of the card on the page with landscape orientation such that each side locates in a center of the page, one overlapping with the other, with the image reading unit; and copying both sides of the card on the page with landscape orientation such that each side locates in a left portion of the page, one overlapping with the other, with the image reading unit.
 3. The method as claimed in claim 1, wherein the deskewing the front and back side images of the two-sided card comprises: calculating coordinates of a bounding box of the scanned image with the controlling unit; detecting a skew-angle of the scanned image with the controlling unit; and when an absolute value of the skew-angle is 0.5° or more, rotating the scanned image by a minus skew-angle with the controlling unit.
 4. The method as claimed in claim 3, wherein the calculating coordinates of a bounding box of the scanned image comprises: calculating projections on horizontal and vertical axes with the controlling unit according to: ${{BW}\left( {r,c} \right)} = \left\{ \begin{matrix} {1,} & {{{R\left( {r,c} \right)} + {G\left( {r,c} \right)} + {B\left( {r,c} \right)}} < T} \\ {0,} & {{otherwise},} \end{matrix}\quad \right.$ ${{{Ph}(c)} = {\sum\limits_{r = 1}^{Nr}{{BW}\left( {r,c} \right)}}},{{{Pv}(r)} = {\sum\limits_{c = 1}^{Nc}{{BW}\left( {r,c} \right)}}},$ where, r and c are coordinates of image pixels; R, G, B are color channels of the image, Nr is a number of rows in the image, Nc is a number of columns, and T is a predetermined threshold; filtering the projections by a filter with the controlling unit according to: Phf(c)=min(Ph(c−2),Ph(c−1),Ph(c),Ph(c+1),Ph(c+2)), Pvf(r)=min(Pv(r−2),Pv(r−1),Pv(r−1),Pv(r),Pv(r+1),Pv(r+2)); calculating bounding box coordinates r_(min), r_(max) and c_(min), c_(max) as leftmost and rightmost positions with the controlling unit according to: ${r_{\min} = {\min\limits_{\forall r}\left( {{Nr},\left. r \middle| {{{Pvf}(r)} > {{Nc}/32}} \right.} \right)}},{r_{\max} = {\max\limits_{\forall r}\left( {1,\left. r \middle| {{{Pvf}(r)} > {{Nc}/32}} \right.} \right)}},{c_{\min} = {\min\limits_{\forall c}\left( {{Nc},\left. c \middle| {{{Phf}(c)} > {{Nr}/32}} \right.} \right)}},{c_{\max} = {\max\limits_{\forall c}{\left( {1,\left. c \middle| {{{Phf}(r)} > {{Nr}/32}} \right.} \right).}}}$ where a magnitude of the filtered projection is greater than the predetermined threshold for vertical and horizontal projections corresponding thereto; testing whether or not there is a blank page, where if r_(min)>r_(max) or c_(min)>c_(max), a blank page is detected and an alert for a user is generated with the controlling unit; and detecting a clipping of a card image with the controlling unit, wherein when r_(max)==Nr, it is determined that a card image is clipped and an alert for a user is generated.
 5. The method as claimed in claim 3, wherein the detecting a skew-angle of the scanned image comprises: extending a bounding box with the controlling unit according to: dc=(c _(max) −c _(min))/4,dr=(r _(max) −r _(min))/4, ce _(min)=max(1,c _(min) −dc),ce _(max)=min(Nc,c _(max) +dc), re _(min)=max(1,r _(min) −dr),re+=min(Nr,r_(max) +dr); calculating distances from a top and bottom to a nearest foreground pixel of the extended bounding box, and storing the distances to distance arrays for each column according to: ${{Dt}(c)} = {\min\left( {\left( {{re}_{\max} - {re}_{\min}} \right),\;\underset{r \in {\lbrack{{re}_{\min},{re}_{\max}}\rbrack}}{\left. {\min\left( {\left. r \middle| {{BW}\left( {r,c} \right)} \right. = 1} \right)} \right)},{{{Db}(c)} = {\min\left( {\left( {{re}_{\max} - {re}_{\min}} \right),\;\underset{r \in {\lbrack{{re}_{\min},{re}_{\max}}\rbrack}}{\left. {\max\left( {\left. r \middle| {{BW}\left( {r,{{ce}_{\max} - c}} \right)} \right. = 1} \right)} \right)},} \right.}}} \right.}$ where cε[ce_(min), ce_(max)]; filtering the distance arrays by a minimal filter according to: Dtf(c)=min(Dt(c−4), . . . ,Dt(c), . . . ,Dt(c+4)) Dbf(c)=min(Db(c−4), . . . ,Db(c), . . . ,Db(c+4)) calculating derivatives of the distance arrays according to: dDtf(c)=Dtf(c+4)−Dtf(c−4) dDbf(c)=Dbf(c+4)−Dbf(c−4) selecting straight ranges on the distance arrays according to: ${\left\{ {{St}(i)} \right\} = \left\{ {\underset{c \in {\lbrack{{{st}\; 1{(i)}},{{st}\; 2{(i)}}}\rbrack}}{\forall{{{{dDtf}(c)}} \leqq 10}},{\left( {{{st}\; 2(i)} - {{st}\; 1(i)}} \right) \geqq 50},{{{Dtf}\left( {{st}\; 2(i)} \right)} < {3{\left( {{re}_{\max} - {re}_{\min}} \right)/4}}}} \right\}},\mspace{79mu}{i = {1\ldots\mspace{14mu}{Nt}}},{\left\{ {{Sb}(j)} \right\} = \left\{ {\underset{c \in {\lbrack{{{sb}\; 1{(j)}},{{sb}\; 2{(j)}}}\rbrack}}{\forall{{{{dDbf}(c)}} \leqq 10}},{\left( {{{sb}\; 2(j)} - {{sb}\; 1(j)}} \right) \geqq 50},{{{Dbf}\left( {{sb}\; 2(j)} \right)} < {3{\left( {{re}_{\max} - {re}_{\min}} \right)/4}}}} \right\}},\mspace{79mu}{j = {1\ldots\mspace{14mu}{Nb}}},$ where {st1} and {sb1} are coordinates of beginning of the straight ranges on the distance arrays from the top and bottom of the bounding box correspondingly, {st2} and {sb2} are coordinates of ending of straight ranges on distance arrays from the top and bottom of bounding box correspondingly, and Nt and Nb are numbers of the straight ranges on the distance arrays from the top and bottom of bounding box correspondingly; calculating angles of all the straight ranges with the controlling unit according to: $\mspace{20mu}{{{{dx}(i)} = {{{st}\; 2(i)} - {{st}\; 1(i)} - 20}},\mspace{20mu}{{{dx}\left( {j + {Nt}} \right)} = {{{sb}\; 2(j)} - {{sb}\; 1(j)} - 20}},\mspace{79mu}{{{dy}(i)} = {{\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dtf}\left( {{{st}\; 2(i)} - 10 + k} \right)}}} - {\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dtf}\left( {{{st}\; 1(i)} + 10 + k} \right)}}}}},{{{dy}\left( {j + {Nt}} \right)} = {{\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dbf}\left( {{{sb}\; 2(i)} - 10 + k} \right)}}} - {\frac{1}{5}{\sum\limits_{k = {- 2}}^{2}\;{{Dbf}\left( {{{sb}\; 1(i)} + 10 + k} \right)}}}}},\mspace{20mu}{{\alpha(n)} = {{arctg}\left( {{{dy}(n)}/{{dx}(n)}} \right)}},\;{N = {{Nb} + {Nt}}},{n = {1\mspace{14mu}\ldots\mspace{20mu} N}},}$ where {dx} is an array of adjacent cathetus, {dy} is an array of opposite cathetus, and (a) is an array of angles; and estimating a skew-angle from the angle arrays with the controlling unit, where an initial estimation of a weighted average of angles Ø and variance δ are according to: $\varnothing = {{\sum\limits_{n = 1}^{N}\;{{\alpha(n)} \times {{{dx}(n)}/{\sum\limits_{n = 1}^{N}\;{{{dx}(n)}\delta}}}}} = {\frac{1}{N - 1}\sqrt{\sum\limits_{n = 1}^{N}\;\left( {\varnothing - {\alpha(n)}} \right)^{2}}}}$ wherein, when δ>25, a special process of estimating positive and negative angles which are close to 45 and −45 degrees is performed according to: ${{bp}(x)} = \left\{ {\begin{matrix} {1,{x > {38{^\circ}}}} \\ 0 \end{matrix},{{{bn}(x)} = \left\{ {\begin{matrix} {0,{x < {{- 38}{^\circ}}}} \\ 0 \end{matrix},{{qap} = {\sum\limits_{n = 1}^{N}\;{{bp}\left( {\alpha(n)} \right)}}},{{qan} = {\sum\limits_{n = 1}^{N}\;{{bn}\left( {\alpha(n)} \right)}}},{{sap} = {\sum\limits^{N}\;{{\alpha(n)} \times {{bp}\left( {\alpha(n)} \right)}}}},\;{{san} = {\sum\limits^{N}\;{{\alpha(n)} \times {{bn}\left( {\alpha(n)} \right)}}}},} \right.}} \right.$ and when qap>0 and qan>0,δ0, then δ=0, and if sap>san, then Ø=sap/qap, or else Ø=sap/qan, and iterations are continued according to: $\varnothing = {{\sum\limits_{n = 1}^{N}\;{{\alpha(n)} \times {{{dx}(n)}/{\sum\limits_{n = 1}^{N}\;{{{dx}(n)}\delta}}}}} = {\frac{1}{N - 1}\sqrt{\sum\limits_{n = 1}^{N}\;\left( {\varnothing - {\alpha(n)}} \right)^{2}}}}$ and when variance δ>1, when (α(n)<Ø−δ) or (α(n)<Ø+δ), then α(n) and dx(n) are excluded from one or more arrays, and estimation of weighted average of angles Ø and variance δ are performed.
 6. The method as claimed in claim 3, wherein a rotation of the image on skew angle φ is performed via two shears with the controlling unit according to the following transformation matrices: $\left\lbrack {x^{1}y^{1}} \right\rbrack = {{\lbrack{xy}\rbrack\begin{bmatrix} {\cos\;\varphi} & {{- \sin}\;\varphi} \\ {\sin\;\varphi} & {\cos\;\varphi} \end{bmatrix}}.}$
 7. The method as claimed in claim 1, wherein detecting an orientation of front and back images of the two-sided card comprises: high-pass filtering of image brightness channel by convolution with a kernel and the controlling unit according to: $\begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & {- 8} & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix};$ labeling connected regions for pixels of the filtered image which are greater than the predetermined threshold T1 with the controlling unit; labeling connected regions for pixels of the filtered image which are less than the predetermined threshold −T1 with the controlling unit; selecting connected regions with an appropriate size of a bounding box with the controlling unit; recognizing ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘7’ ciphers that have one of four orientations 0°, 90°, 180°, 270° for each connected region, and calculating the number of recognized ciphers for each orientation with the controlling unit; and determining an orientation of a card image based on the number of recognized ciphers for each orientation with the controlling unit.
 8. The method as claimed in claim 7, wherein the detecting an orientation of a card image with the controlling unit is performed according to: $\Omega = {\underset{{ie}{\{{0,90,120,270}\}}}{\left. i \right|}{\max\left( {{\left( {{0.5\;{N_{1}(i)}} + {N_{2}(i)} + {N_{3}(i)} + {N_{4}(i)} + {N_{5}(i)} + {0.5\;{N_{7}(i)}}} \right) \times \left( {{{sign}\left( {N_{1}(i)} \right)} + {{sign}\left( {N_{2}(i)} \right)} + {{sign}\left( {N_{3}(i)} \right)} + {{sign}\left( {N_{4}(i)} \right)} + {{sign}\left( {N_{5}(i)} \right)} + {{sign}\left( {N_{7}(i)} \right)}} \right)},} \right.}}$ wherein N₁(i), N₂(i), N₃(i), N₄(i), N₅(i) and N₇(i) are numbers of recognized regions as ciphers ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘7,’ respectively, for orientation i.
 9. The method as claimed in claim 7, wherein recognition of the ‘1’ cipher is determined where: f 1₁ = Mr/M c; ${{f\; 1_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{Mr}\;{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}\;{F\left( {r,c} \right)}}};{\sum\limits_{r = 1}^{Mr}\;{\sum\limits_{c = {{M\; c} - 2}}^{{M\; c} - 1}\;{F\left( {r,c} \right)}}}} \right)}/\left( {2\;{Mr}} \right)}};$ ${{f\; 1_{3}} = {\sum\limits_{r = {{Mr}/2}}^{Mr}\;{\sum\limits_{c = 1}^{{m\;{c/2}} - 1}\;{F\left( {r,c} \right)}}}};$ ${{f\; 1_{4}} = {\sum\limits_{r = 1}^{{{Mc}/2} - 1}\;{\sum\limits_{c = 1}^{{M\;{c/2}} - r}\;{F\left( {r,c} \right)}}}};{and}$ ${f\; 1_{5}} = {\sum\limits_{r = {M\;{c/2}}}^{{Mr}/2}\;{\sum\limits_{c = 2}^{3}\;{{F\left( {r,c} \right)}.}}}$
 10. The method as claimed in claim 7, wherein recognition of the ‘2’ cipher is determined where:   f 2₁ = Mr/M c; $\mspace{20mu}{{{f\; 2_{2}} = {{\max\left( {{\sum\limits_{r = {Mr}}^{Mr}\;{\sum\limits_{c = 1}^{M\; c}\;{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}\;{\sum\limits_{c = 1}^{M\; c}\;{F\left( {r,c} \right)}}}} \right)}/\left( {2\; M\; c} \right)}};}$ $\mspace{20mu}{{{f\; 2_{3}} = {\sum\limits_{c = {3\;{{Mr}/5}}}^{3\;{{Mr}/4}}\;{\sum\limits_{r = 0}^{c - {3\;{{Mr}/5}}}\;{F\left( {{{Mr} - r},c} \right)}}}};}$ $\mspace{20mu}{{{f\; 2_{4}} = {{\sum\limits_{r = 1}^{2}\;{\sum\limits_{c = 1}^{2}\;{F\left( {r,c} \right)}}} + {\sum\limits_{r = 1}^{2}\;{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}\;{F\left( {r,c} \right)}}}}};}$ ${{f\; 2_{5}} = {{\max\left( {{\sum\limits_{r = 1}^{2}\;{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}\;{F\left( {r,c} \right)}}};{\sum\limits_{r = 3}^{3}\;{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}\;{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{M\;{c/3}} + 1} \right)} \right)}};$ ${{f\; 2_{6}} = {{\max\left( {{\sum\limits_{r = {{Mr}/5}}^{2\;{{Mr}/5}}\;{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}\;{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr}/5}}^{2\;{{Mr}/5}}\;{\sum\limits_{c = {{M\; c} - 2}}^{{M\; c} - 1}\;{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)}};$   and $\mspace{20mu}{{{f\; 2_{7}} = {\sum\limits_{r = {{Mr}/2}}^{2\;{{Mr}/3}}\;{\sum\limits_{c = 1}^{{2\;{{Mr}/3}} - r + 1}\;{F\left( {r,c} \right)}}}},}$ wherein F is a binary image of a connected region, and Mr×Mc is size of the image F.
 11. The method as claimed in claim 7, wherein recognition of the ‘3’ cipher is determined by:   f 3₁ = Mr/M c; ${{f\; 3_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{M\;{c/3}} + 1} \right)} \right)}};$ ${{f\; 3_{3}} = {{\max\left( {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{M\;{c/3}} + 1} \right)} \right)}};$ ${f\; 3_{4}} = {\max\left( {{\sum\limits_{r = {3\;{{Mr}/5}}}^{4\;{{Mr}/5}}{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{F\left( {r,c} \right)}}};{\left( {\sum\limits_{r = {3\;{{Mr}/5}}}^{4\;{{Mr}/5}}{\sum\limits_{c = {{M\; c} - 2}}^{{2\; M\; c} - 1}{F\left( {r,c} \right)}}} \right)/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)};{{f\; 3_{5}} = {{\max\left( {{\sum\limits_{r = {{Mr}/5}}^{2\;{{Mr}/5}}{\sum\limits_{c = {{M\; c} - 2}}^{{M\; c} - 1}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr}/5}}^{2\;{{Mr}/5}}{\sum\limits_{c = {{M\; c} - 3}}^{{2\; M\; c} - 2}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{{Mr}/5} + 1} \right)} \right)}};{{f\; 3_{6}} = {{{\max\left( {{{M\; c} - {\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {f\left( {{{Mr}/2},i} \right)} \right. = 1} \right)}},{{M\; c} - {\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {{{{Mr}/2} - 1},i} \right)} \right. = 1} \right)}},{{M\; c} - {\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\}}}}\left( {\left. i \middle| {F\left( {{{{Mr}/2} - 2},i} \right)} \right. = 1} \right)}}} \right)}/M}\; c}};{\quad{{{f\; 3_{7}} = {{{\min\left( {{\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {{{Mr}/2},i} \right)} \right. = 1} \right)},{\min\limits_{\forall{i{{{elme}{{\lbrack{1,{M\; c}}\rbrack}}}}}}\left( {\left. i \middle| {f\left( {{{{Mr}/2} - 1},i} \right)} \right. = 1} \right)},{\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( i \middle| {{F\left( {{{{Mr}/2} + 1},i} \right)} - 1} \right)}} \right)}/M}\; c}};\mspace{20mu}{{f\; 3_{8}} = {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = 1}^{2}{F\left( {r,c} \right)}}} + {\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{F\left( {r,c} \right)}}}}};\mspace{20mu}{{f\; 3_{9}} = {15{\sum\limits_{r = {{{Mr}/3} + 1}}^{2\;{{Mr}/3}}{\sum\limits_{c = 1}^{2\; M\;{c/5}}{{F\left( {r,c} \right)}/\left( {2\; M\;{cMr}} \right)}}}}};\mspace{20mu}{{f\; 3_{10}} = {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 1}^{2}{F\left( {r,c} \right)}}} + {\sum\limits_{r = 1}^{2}{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{F\left( {r,c} \right)}}}}};{{f\; 3_{11}} = {64{\sum\limits_{r = {{{Mr}/3} - {{({{Mr} - 2})}/16}}}^{{{Mr}/3} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{M\;{c/2}} - {{({{M\; c} - 2})}/16}}}^{{M\;{c/2}} + {{({{M\; c} - 2})}/16}}{{F\left( {r,c} \right)}/\left( {\left( {{M\; c} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}}}};{{f\; 3_{12}} = {64{\sum\limits_{r = {{2\;{{Mr}/3}} - {{({{Mr} - 2})}/16}}}^{{2\;{{Mr}/3}} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{M\;{c/2}} - {{({{M\; c} - 2})}/16}}}^{{M\;{c/2}} + {{({{M\; c} - 2})}/16}}{{F\left( {r,c} \right)}/\left( {\left( {{M\; c} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}}}};{{f\; 3_{13}} = {{\left( {\left( {\max\limits_{\forall{j \in {\lbrack{{{Mr}/4},{{{Mr}/2} - {{({{{Mr}/2} - 2})}/16}}}}}}\left( {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} \right)} \right) - 1} \right)/M}\; c}};{{f\; 3_{14}} = {{\left( {\left( {\max\limits_{\forall{j \in {\lbrack{{{{Mr}/2} + {{({{{Mr}/2} - 2})}/16}},{3\;{{Mr}/4}}}\rbrack}}}\left( {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} \right)} \right) - 1} \right)/M}\; c}};{{{and}f\; 3_{15}} = {64{\sum\limits_{r = {{{Mr}/2} - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{M\;{c/2}} + 1 - {{({{M\; c} - 2})}/16}}}^{{M\;{c/2}} + 1 + {{({{M\; c} - 2})}/16}}{{F\left( {r,c} \right)}/\left( {\left( {{M\; c} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}}}};}}} \right.}$ where F is binary image of a connected region, and Mr×Mc is size of the image F.
 12. The method as claimed in claim 7, wherein recognition of the ‘4’ cipher is determined by:   f 4₁ = Mr|M c; $\mspace{20mu}{{{f\; 4_{2}} = {\sum\limits_{r = 1}^{M\;{c/3}}\;{\sum\limits_{c = 1}^{{M\;{c/3}} - r - 1}\;{F\left( {r,c} \right)}}}};}$ $\mspace{20mu}{{{f4}_{3} = {\sum\limits_{r = {{5\;{{Mr}/6}} + 1}}^{Mr}{\sum\limits_{c = 1}^{M\;{c/3}}\;{F\left( {r,c} \right)}}}};}$ $\mspace{20mu}{{{f\; 4_{4}} = {\max\limits_{i \in {\lbrack{{{{Mr}/2} + 2};{4\;{{Mr}/5}}}\rbrack}}{{\left( {\sum\limits_{c = 1}^{M\; c}\;{F\left( {i,c} \right)}} \right)/M}\; c}}};}$ $\mspace{20mu}{{{f\; 4_{5}} = {2{\max\limits_{j \in {\lbrack{{3\; M\;{c/4}};{5\; M\;{c/6}}}\rbrack}}{\left( {\sum\limits_{r = {{Mr}/2}}^{Mr}\;{F\left( {r,j} \right)}} \right)/{Mr}}}}};}$ $\mspace{20mu}{{{f\; 4_{6}} = {\left( {{\sum\limits_{r = 1}^{{Mr}/2}\;{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{F\left( {r,c} \right)}}} + {3{\sum\limits_{r = {5\;{{Mr}/6}}}^{Mr}{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{F\left( {r,c} \right)}}}}} \right)/{Mr}}};}$ $\mspace{20mu}{{{f\; 4_{7}} = {\sum\limits_{r = {{Mr}/5}}^{{Mr}/2}{\sum\limits_{c = {M\;{c/5}}}^{M\;{c/2}}{{F\left( {r,c} \right)}/\left( {\left( {{3\;{{Mr}/10}} + 1} \right)\left( {{3\; M\;{c/10}} + 1} \right)} \right)}}}};{and}}$ ${{f\; 4_{8}} = {64{{\min\left( {{\sum\limits_{r = {{{Mr}/2} + 1 - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + 1 + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{M\;{c/2}} + 1 - {{({{M\; c} - 2})}/16}}}^{{M\;{c/2}} + 1 + {{({{M\; c} - 2})}/16}}{F\left( {r,c} \right)}}},{\sum\limits_{r = {{{Mr}/2} + 1 - {{({{Mr} - 2})}/16}}}^{{{Mr}/2} + 1 + {{({{Mr} - 2})}/16}}{\sum\limits_{c = {{M\;{c/2}} - {{({{M\; c} - 2})}/16}}}^{{M\;{c/2}} + {{({{M\; c} - 2})}/16}}{F\left( {r,c} \right)}}}} \right)}/\left( {\left( {{M\; c} - 2} \right)\left( {{Mr} - 2} \right)} \right)}}};$ where F is a binary image of a connected region, and Mr×Mc is size of the image F.
 13. The method as claimed in claim 7, wherein recognition of the ‘5’ cipher is determined by:   f 5₁ = Mr|M c; $\mspace{20mu}{{{f\; 5_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 3}^{{M\; c} - 2}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = 3}^{{M\; c} - 2}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{M\; c} - 4} \right)} \right)}};}$ ${{f\; 5_{3}} = {{\max\left( {{\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{Mr} - 2}}^{{Mr} - 1}{\sum\limits_{c = {M\;{c/3}}}^{2\; M\;{c/3}}{F\left( {r,c} \right)}}}} \right)}/\left( {2\left( {{M\;{c/3}} + 1} \right)} \right)}};$ $\mspace{20mu}{{{f\; 5_{4}} = {{\left( {{M\; c} - \left( {\min\limits_{\forall{j \in {\lbrack{{{{Mr}/5} + 1},{2\;{{Mr}/5}}}\rbrack}}}\left( {\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} \right)} \right)} \right)/M}\; c}};}$ ${{f\; 5_{5}} = {25{{\max\left( {{\sum\limits_{r = {{{Mr}/5} + 1}}^{2\;{{Mr}/5}}{\sum\limits_{c = 1}^{M\;{c/5}}{F\left( {r,c} \right)}}};{\sum\limits_{r = {{{Mr}/5} + 1}}^{2\;{{Mr}/5}}{\sum\limits_{c = {M\;{c/5}}}^{2\; M\;{c/5}}{F\left( {r,c} \right)}}}} \right)}/\left( {M\; c\;{Mr}} \right)}}};$ $\mspace{20mu}{{{f\; 5_{6}} = {\left( {{\min\limits_{\forall{i \in {\lbrack{{3\;{{Mr}/5}},{Mr}}\rbrack}}}{\left( {\left. i \middle| {F\left( {i,j} \right)} \right. = 1} \right)\mspace{14mu}{and}\mspace{14mu} j}} \in \left\lbrack {{M\;{c/2}},{M\; c}} \right\rbrack} \right)/{Mr}}};}$   and  $\mspace{20mu}{{f\; 5_{7}} = {\sum\limits_{r = {{Mr} - 1}}^{Mr}{\sum\limits_{c = {{M\; c} - 1}}^{M\; c}{{F\left( {r,c} \right)}.}}}}$
 14. The method as claimed in claim 7, wherein recognition of the ‘7’ cipher is determined by:   f 7₁ = Mr/M c; $\mspace{20mu}{{{f\; 7_{2}} = {{\max\left( {{\sum\limits_{r = 1}^{2}{\sum\limits_{c = 1}^{M\; c}{F\left( {r,c} \right)}}};{\sum\limits_{r = 2}^{3}{\sum\limits_{c = 1}^{M\; c}{F\left( {r,c} \right)}}}} \right)}/\left( {2M\; c} \right)}};}$ ${{f\; 7_{3}} = {{\left( {\max\limits_{\forall{j \in {\lbrack{{{Mr}/4},{Mr}}\rbrack}}}\left( {{\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)} - {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {j,i} \right)} \right. = 1} \right)}} \right)} \right)/M}\; c}};$ ${f\; 7_{4}} = {\left( {{M\; c} - {\frac{4}{Mr}{\sum\limits_{r = {3\;{{Mr}/4}}}^{Mr}{\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\}}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = {1 - {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}}} \right)}}}} \right)/{\quad{{M\; c};{{f\; 7_{5}} = {\quad{{{\left( {{M\; c} - {\frac{4}{Mr}{\sum\limits_{r = {{Mr}/4}}^{{Mr}/2}{\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\}}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = {1 - {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}}} \right)}}}} \right)/M}\; c};\mspace{20mu}\begin{matrix} {{{f\; 7_{6}} = {\sum\limits_{r = {{Mr}/4}}^{{Mr}/2}{\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\}}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = {1 - {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}}} \right)}}};{and}} \\ {- {\sum\limits_{r = {3\;{{Mr}/4}}}^{Mr}{\max\limits_{\forall{i \in {\lbrack{1,{M\; c}}\}}}}{\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = {1 - {\min\limits_{\forall{i \in {\lbrack{1,{M\; c}}\rbrack}}}\left( {\left. i \middle| {F\left( {r,i} \right)} \right. = 1} \right)}}} \right).}}}} \end{matrix}}}}}}}$
 15. An image forming apparatus to copy a two-sided card, the image forming apparatus comprising: a user interface unit to adjust a page layout and orientation to copy both sides of a two-sided card so as to position each side to be copied of the two-sided card within the page; an image reading unit to read the both sides of the two-sided card and to generate scanned images of each side of the two-sided card; a controlling unit to generate image data wherein the scanned images are laid out on at least one page according to the adjusted page layout; and an output unit to output the image data generated by the controlling unit.
 16. The image forming apparatus as claimed in claim 15, wherein the controlling unit deskews the scanned images so as to reduce any skew from the scanned images of each side of the two-sided card present in the images because of an orientation of the two-sided card, and detects an orientation of the scanned images, the orientation including an angle of each of the scanned images, wherein the detecting a orientation of the scanned imaged detects the orientation in order not to place the deskewed image up-side down on the page.
 17. The image forming apparatus as claimed in claim 16, wherein the controlling unit calculates coordinates of a bounding box of the scanned images, detects a skew-angle of the scanned images, and when an absolute value of the detected skew-angle is 0.5° or more, deskews the scanned images by rotating them by a minus skew-angle.
 18. The image forming apparatus as claimed in claim 15, further comprising: a storage unit to store the image data generated by the controlling unit.
 19. The image forming apparatus as claimed in claim 15, wherein the layout to copy both sides of a two-sided card is at least one of copying both sides on a page with portrait orientation, copying both sides on a page with landscape orientation, and duplex copying.
 20. A method of copying a two-sided card with an image forming apparatus, the method comprising: adjusting a page layout and orientation for copying both sides of the two-sided card with a user interface unit of the image forming apparatus; reading the both sides of the two-sided card to form scanned images of the both sides of the two-sided card with an image reading unit of the image forming apparatus; generating image data where the scanned images of the both sides of the two-sided card are laid out on at least one page according to the adjusted page layout with a controlling unit of the image forming apparatus; and outputting the generated page with an output unit of the image forming apparatus.
 21. The method as claimed in claim 20, further comprising: deskewing the scanned images with the controlling unit so as to reduce any skew from the reading of the both sides of the two-sided card because of an orientation of the two-sided card; and detecting an orientation of the scanned images with the controlling unit, the orientation being an angle of the scanned images, wherein the detecting an orientation of the scanned imaged detects the orientation in order not to place the deskewed image up-side down on the page.
 22. The method as claimed in claim 20, further comprising: storing the generated image data in a storing unit of the image forming apparatus.
 23. The method as claimed in claim 20, wherein the layout for copying both sides of the two-sided card comprises at least one of copying both sides of the card on a page with portrait orientation, copying both sides of the card on a page with landscape orientation, and duplex copying.
 24. The method as claimed in claim 21, wherein the deskewing the scanned images comprises: calculating coordinates of a bounding box of the scanned images with the controlling unit; detecting a skew-angle of the scanned images with the controlling unit; and when an absolute value of the detected skew-angle of the scanned images is 0.5° or more, rotating the scanned images by a minus skew-angle with the controlling unit.
 25. A method of copying a two-sided card with an image forming apparatus having a scanner, the method comprising: receiving a selection of a page layout and orientation for copying both sides of the two-sided card with an input unit, so as to position each side to be copied of the two-sided card within the page; scanning both sides of the two-sided card with the scanner to form images of the both sides of the two-sided card; and generating an output image to be output by the image forming apparatus by combining the formed images of the two-sided card according to the received selection of the page layout and orientation.
 26. The method of claim 25, further comprising: deskewing the scanned images of the both sides of the two-sided card with a processor of the image forming apparatus before the generating the output image so as to reduce any skew from the scanning of both sides of the two-sided card that is present in the scanned images because of the orientation of the two-sided card.
 27. The method of claim 26, wherein the deskewing the scanned images comprises: calculating coordinates of a bounding box of the scanned images; detecting a skew-angle of the scanned images; and when an absolute value of the detected skew-angle is 0.5° or more, deskewing the scanned images by rotating them by a minus skew-angle.
 28. An image forming apparatus to copy a two-sided card, the image forming apparatus comprising: an input unit to receive a selection of a page layout and orientation to copy both sides of the two-sided card; a scanner to scan both sides of the two-sided card to form images of the both sides of the two-sided card; and a processor to generate an output image to be output by the image forming apparatus by combining the scanned images of the two-sided card according to the received selection of the page layout and orientation.
 29. The image forming apparatus of claim 28, wherein the processor deskews the scanned images so as to reduce any skew from the scanning of the front side of the two-sided card that is present in the scanned images because of an orientation of the two-sided card.
 30. The image forming apparatus of claim 29, wherein the processor calculates coordinates of a bounding box of the scanned images, detects a skew-angle of the scanned images, and when an absolute value of the detected skew-angle is 0.5° or more, the processor deskews the scanned images by rotating them by a minus skew-angle. 